<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<p id="content"> 请等三秒钟!</p>
<p id="p"></p>
</body>
<style>
    #p {
        color: red;
    }
</style>
<script>
    function time() {
        setTimeout("xianshi()", 3000)
    }
    function xianshi() {
        document.getElementById("p").innerHTML = "我是三秒后显示的内容!"
    }
    time()
</script>

</html>